package cn.ebook.util;

import cn.ebook.enume.ErrorEnum;
import cn.ebook.vo.WebVo;

public class VoUtil {
	static WebVo  vo = new WebVo();

	public static WebVo getSuccess(Object data) {

		vo.setCode(0);
		vo.setMsg("成功了");
		vo.setData(data);
		return vo;
	}

	public static WebVo getErro(ErrorEnum error) {
		vo.setCode(error.getCode());
		vo.setMsg(error.getMsg());
		return vo;
	}
}
